package com.ulic.customerManApplication.commonmodule.bo;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.usermodule.bo.User;

/**
 * MailSignature.java
 * Description: 邮件签名
 * Copyright (c) Department of Research and Development/Beijing/北京中科汇联信息技术有限公司.
 * All Rights Reserved.
 * @version 1.0  
 * 2012-9-10 下午04:58:16 李求智 (liqz@huilan.com) created
 */
@Entity
@Table(name = "T_GYW_MAILSIGNATURE")
@SequenceGenerator(name="mailsignature_seq",sequenceName="S_GYW_MAILSIGNATURE_ID")
public class MailSignature implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int oid;//主键
	private byte[] signature;//签名内容
	private User user;//用户
	
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="mailsignature_seq")
	public int getOid() {
		return oid;
	}
	public void setOid(int oid) {
		this.oid = oid;
	}
	
	public byte[] getSignature() {
		return signature;
	}
	public void setSignature(byte[] signature) {
		this.signature = signature;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	

}
